//
//  SmallDecisionsFxqViewController+Event.h
//  SmallDecisions
//
//  Created by 李付雄 on 2025/08/28.
//


#import "SmallDecisionsFxqViewController+Event.h"
#import "SmallDecisionsFxqSelectTypeViewController.h"

@implementation SmallDecisionsFxqViewController (Event)

- (void)selectSmallDecisionsFxqTypeBtnAction {
    SmallDecisionsFxqSelectTypeViewController *fxqSelectTypeVC = [[SmallDecisionsFxqSelectTypeViewController alloc] init];
    weakSelf(self);
    fxqSelectTypeVC.callback = ^(id type) {
        weakself.fxqTaskType = [type intValue];
    };
    [SmallDecisionsNavigatorManager presentViewController:fxqSelectTypeVC animationType:SmallDecisionsAnimationTypePicker height:380];
}

- (void)reloadSmallDecisionsFxqTaskBtnAction {

    [SmallDecisionsHUDHelper showSuccess:@"已刷新任务"];
    switch (self.fxqTaskType) {
        case 1: {
            self.fxqTaskList = [NSArray yy_modelArrayWithClass:[SmallDecisionsFxqTaskModel class] json:[SmallDecisionsFxqTaskData loadFxqTaskAiMeiRenWu]];
        } break;
        case 2: {
            self.fxqTaskList = [NSArray yy_modelArrayWithClass:[SmallDecisionsFxqTaskModel class] json:[SmallDecisionsFxqTaskData loadFxqTaskReLianRenWu]];
        } break;
        case 3: {
            self.fxqTaskList = [NSArray yy_modelArrayWithClass:[SmallDecisionsFxqTaskModel class] json:[SmallDecisionsFxqTaskData loadFxqTaskHuoReRenWu]];
        } break;
        case 4: {
            self.fxqTaskList = [NSArray yy_modelArrayWithClass:[SmallDecisionsFxqTaskModel class] json:[SmallDecisionsFxqTaskData loadFxqTaskHunHeRenWu]];
        } break;
        default:
            break;
    }
}

- (void)playSmallDecisionsFxqSystemSoundAction {
    AudioServicesPlaySystemSound(1520);
}

@end
